<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>11_父组件向子组件传值</title>
    <script src="../node_modules/vue/dist/vue.js"></script>
</head>
<body>
    <div id=app>
        <son :f2s="msg"></son>

    </div>


    <script>
        const vm = new Vue({
            el:'#app',
            data:{
                msg: '父->子'
            },
            components:{
                son:{
                    template: '<h3>我是子组件: {{f2s}}</h3>',
                    props: ['f2s']
                }
            }
        });
    </script>
</body>
</html>